package cn.xu.liteflow.components;

import com.yomahub.liteflow.core.NodeComponent;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @Author xuguofei clark2021@qq.com || WX clark_2023
 * @Date 2024/3/5
 * @Desc TODO
 **/
@Component("aContext")
public class AContextCmp extends NodeComponent {

    @Override
    public void process() {
        //do your business
        System.out.println("aContext-------------------hell world");
        Order order = this.getContextBean(Order.class);
        System.out.println("order----->"+order);
        if(order.getConcurrent().addAndGet(1)==1){
            order.setAddr("上海市青浦区蟠龙天地");
        }
        List<Serializable> list = new ArrayList<>();
        list.add("1111");
        order.getRequestContextDataMap().put("aaa", list);

    }

}
